package lagou.ExceptionTest;

public class UserListTest {
    public static void show(Integer age) throws AgeCheckTest {
        if(age < 0 ||  age > 120){
            throw new AgeCheckTest("年龄不合理奥");
        }
        System.out.println("年龄合理");
    }
    public static void main(String[] args) {
        try {
            UserListTest.show(180);
        } catch (AgeCheckTest e) {
            e.printStackTrace();
        }
    }
}
